MyGame.s6_1 = function(game) {
	
	

};


MyGame.s6_1.prototype = {
    create: function() {
    	
    	
		console.log('s6_1-huoche')

        game.bg = game.add.image(0,0,'s6_1_bg');


        game.mask = game.add.image(70,651,'s6_1_mask');




        game.s6_1_text_1 = game.add.image(game.world.centerX,730,'s6_1_text_1');
        game.s6_1_text_1.anchor.set(0.5,0);
        game.s6_1_text_1.alpha = 0

        
        game.s6_1_text_2 = game.add.image(game.world.centerX,780,'s6_1_text_2');
        game.s6_1_text_2.anchor.set(0.5,0);
        game.s6_1_text_2.alpha = 0

        
        game.s6_1_text_3 = game.add.image(game.world.centerX,830,'s6_1_text_3');
        game.s6_1_text_3.anchor.set(0.5,0);
        game.s6_1_text_3.alpha = 0


        game.add.tween(game.mask).from( { alpha: 0}, 2000, Phaser.Easing.Cubic.Out, true, 2000).onComplete.add(function(){

            game.add.tween(game.s6_1_text_1).to( { alpha: 1 ,y:'+10'}, 2000, Phaser.Easing.Cubic.Out, true, 1000)
            game.add.tween(game.s6_1_text_2).to( { alpha: 1 ,y:'+10'}, 2000, Phaser.Easing.Cubic.Out, true, 1200)
            game.add.tween(game.s6_1_text_3).to( { alpha: 1 ,y:'+10'}, 2000, Phaser.Easing.Cubic.Out, true, 1400).onComplete.add(function(){
    
                GameUI.touch(620,735,function(){
                    game.touch1.kill()
                    game.touch2.kill()
                    loadChart('p6_1',function(){
                        $('#p6_1').hide();
                        setTimeout(function(){
                            $('#p6_1').find('.chat-content').css({
                                opacity : 1
                            })
                        },0)
        
                        game.state.start('s7')
        
        
                    })
        
                });
    
                //game.state.start('s7')
            })

        })



       

      


        

        GameUI.cutscenes()


       
        

       

    },


    

    update: function() {
    	
    	
    	
    },
    
    
    
    render : function(){
    	/*game.obstacles.forEach(function(item){
            game.debug.body(item);
        })
    	game.debug.body(game.player);*/
    }
};

